tools: Always check for __linux__ not __Linux__
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 2 Jul 2009 20:45:30 +0000 (21:45 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 2 Jul 2009 20:45:30 +0000 (21:45 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/blktap2/include/blk_uuid.h
tools/blktap2/include/libvhd.h
tools/blktap2/vhd/lib/libvhd.c
tools/console/daemon/io.c
tools/misc/gtraceview.c

index 598ab2b66149f4a8ccec4eb2bc3dbda228be72d8..9d554a9ce5f25a5404910ec5e0151453bd6326d5 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __BLKTAP2_UUID_H__
 #define __BLKTAP2_UUID_H__
 
-#if defined(__linux__) || defined(__Linux__)
+#if defined(__linux__)
 
 #include <uuid/uuid.h>
 
index 71082ad8434eba7ba8ead08096a8af0bbf08062f..ac6908415eea41e9eb7f6ef17addb7cebc5d5495 100644 (file)
@@ -28,7 +28,7 @@
 #define _VHD_LIB_H_
 
 #include <string.h>
-#if defined(__linux__) || defined(__Linux__)
+#if defined(__linux__)
 #include <endian.h>
 #include <byteswap.h>
 #elif defined(__NetBSD__)
@@ -44,7 +44,7 @@
 #endif
 
 #if BYTE_ORDER == LITTLE_ENDIAN
-#if defined(__linux__) || defined(__Linux__)
+#if defined(__linux__)
   #define BE16_IN(foo)             (*(foo)) = bswap_16(*(foo))
   #define BE32_IN(foo)             (*(foo)) = bswap_32(*(foo))
   #define BE64_IN(foo)             (*(foo)) = bswap_64(*(foo))
index 1dd36238e63a52e39e63c3f0c255b4f144282e1a..ae691a0a1eda375a0a93b620a7f9abdaf557f3bb 100644 (file)
@@ -1335,7 +1335,7 @@ vhd_macx_encode_location(char *name, char **out, int *outlen)
        snprintf(uri, ibl+1, "file://%s", name);
 
        if (iconv(cd,
-#if defined(__linux__) || defined(__Linux__)
+#ifdef __linux__
            (char **)
 #endif
            &urip, &ibl, &uri_utf8p, &obl) == (size_t)-1 ||
@@ -1425,7 +1425,7 @@ vhd_w2u_encode_location(char *name, char **out, int *outlen)
        }
 
        if (iconv(cd,
-#if defined(__linux__) || defined(__Linux__)
+#ifdef __linux__
            (char **)
 #endif
            &urip, &ibl, &uri_utf16p, &obl) == (size_t)-1 ||
@@ -1470,7 +1470,7 @@ vhd_macx_decode_location(const char *in, char *out, int len)
                return NULL;
 
        if (iconv(cd,
-#if defined(__linux__) || defined(__Linux__)
+#ifdef __linux__
                (char **)
 #endif
                &in, &ibl, &out, &obl) == (size_t)-1 || ibl)
@@ -1502,7 +1502,7 @@ vhd_w2u_decode_location(const char *in, char *out, int len, char *utf_type)
                return NULL;
 
        if (iconv(cd,
-#if defined(__linux__) || defined(__Linux__)
+#ifdef __linux__
                (char **)
 #endif
                &in, &ibl, &out, &obl) == (size_t)-1 || ibl)
@@ -2498,7 +2498,7 @@ vhd_initialize_header_parent_name(vhd_context_t *ctx, const char *parent_path)
        memset(dst, 0, obl);
 
        if (iconv(cd,
-#if defined(__linux__) || defined(__Linux__)
+#ifdef __linux__
                (char **)
 #endif
                &pname, &ibl, &dst, &obl) == (size_t)-1 || ibl)
index 67fb22c612e82dd21c9ed5f79e4dda58e7018deb..5a6ccbfd4397bd1843ac7c1211cd74981a93d31e 100644 (file)
 #include <assert.h>
 #if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <util.h>
-#elif defined(__linux__) || defined(__Linux__)
+#elif defined(__linux__)
 #include <pty.h>
-#endif
-#if defined(__sun__)
+#elif defined(__sun__)
 #include <stropts.h>
 #endif
 
index c86a809030431ccaa37272ee33605164d0338bc2..411a54e9a0c742a6fc5ddda106fc30f9b0e4d6f8 100644 (file)
@@ -30,7 +30,7 @@
 #include <xenctrl.h>
 #include <xen/trace.h>
 
-#ifdef __Linux__
+#ifdef __linux__
 #include <ncurses.h>
 #endif
 #ifdef __NetBSD__